if __name__=='__main__':
    print('this is package1')
class Student:
    #定义一个类方法
    people=0
    def __init__(self,name,age,subject,gender,passwords):
        self.__name=name
        self.__age=age
        self.__subject=subject
        self.__gender=gender
        self.__password=passwords
        self.__visit_times=0
        Student.people+=1
    #于2.20更新：变量最好都设置成私有属性，防止从外部进行修改
    #老老实实__init__,不然会被警告的
    def __login(self):
        print('为保证你的安全，请输入您的账号和密码')
        inputted_name = input('请输入您的账号')
        inputted_password = input('请输入您的密码')
        count = 0
        while count < 5 and not (inputted_name == self.__name and inputted_password == self.__password):
            count += 1
            if 5-count>0:
                print('账号或密码错误，请重新输入，还能输入{}次:'.format(5 - count))
                inputted_name = input('请输入您的账号')
                inputted_password = input('请输入您的密码')
        if count==5:
            print('登录失败，请重试')
            return False
        else:
            print('登录成功')
            return True
    def share_info(self):
        if Student.__login(self):
            print(f'名称为{self.__name}')
            print(f'年龄为{self.__age}')
            print(f'性别是:{self.__gender}')
            print(f'学习科目:{self.__subject}')
            self.__visit_times += 1
            print('共计访问{}次'.format(self.__visit_times))
    def study(self):
        pass#如果写pass跳过，表示没有内容
    def play_games(self,name):
        pass
    @classmethod
    def count(cls):
        print('共计注册人数为{}人'.format(Student.people))
class RollingKing(Student):
    def __init__(self,name,age,subject,gender,passwords):
        super().__init__(name,age,subject,gender,passwords)
    def study(self):
        print('偶遇强大卷怪，狂卷一切如同怪物，拼尽全力无法战胜')
    def play_games(self,name):
        print('{}打游戏也是卷不过的存在捏'.format(name))
    def sleep(self,hours):
        print(f'{self.__name},你又在卷哦，一天睡{hours}个小时，休息一下吧')
class WiseKing(Student):
    def __init__(self,name,age,subject,gender,passwords):
        super().__init__(name,age,subject,gender,passwords)
    def study(self):
        print('天赋型选手{},学习什么的肯定是轻轻松松吧'.format(self.__name))
    def play_games(self,name):
        print('原神，启动')#先叠甲，本人其实不玩原，也不会对一切关于原的言论负责（如果有的话）
#创建一个人的账号和密码
def create():
    name=input('请输入你的姓名')
    keywords=input('请设置你的密码')
    while len(keywords)<=6:
        keywords=input('密码位数过短，请重新设置')
    print('创建成功！')
    return name,keywords